Crate rusb

source ·
Expand description

This crate provides a safe wrapper around the native libusb library.

Re-exports§

Modules§

Structs§

Enums§

Traits§

  • When handling a Hotplug::device_arrived event it is considered safe to call any rusb function that takes a Device. It also safe to open a device and submit asynchronous transfers. However, most other functions that take a DeviceHandle are not safe to call. Examples of such functions are any of the synchronous API functions or the blocking functions that retrieve various USB descriptors. These functions must be used outside of the context of the Hotplug functions.

Functions§

  • Returns a list of the current USB devices. Using global context
  • Disable device scanning in libusb init.
  • Tests whether the running libusb library supports capability API.
  • Tests whether the running libusb library has HID access.
  • Tests whether the running libusb library supports hotplug.
  • Convenience function to open a device by its vendor ID and product ID. Using global context
  • Builds a value for the bmRequestType field of a control transfer setup packet.
  • Sets the log level of a libusb global context.
  • Tests whether the running libusb library supports detaching the kernel driver.
  • Returns a structure with the version of the running libusb library.

Type Aliases§

  • A result of a function that may return a Error.